import request from '/@/utils/request';

// 查询电485集中器列表
export function listConcentrator(query?: Object) {
  return request({
    url: '/module/device/concentrator/list',
    method: 'get',
    params: query
  })
}

// 查询电485集中器详细
export function getConcentrator(id?: number) {
  return request({
    url: '/module/device/concentrator/' + id,
    method: 'get'
  })
}

// 新增电485集中器
export function addConcentrator(data?: Object) {
  return request({
    url: '/module/device/concentrator',
    method: 'post',
    data: data
  })
}

// 修改电485集中器
export function updateConcentrator(data?: Object) {
  return request({
    url: '/module/device/concentrator',
    method: 'put',
    data: data
  })
}

// 删除电485集中器
export function delConcentrator(id?: number) {
  return request({
    url: '/module/device/concentrator' + id,
    method: 'delete'
  })
}

// 导出电485集中器
export function exportConcentrator(query?: Object) {
  return request({
    url: '/module/device/concentrator/export',
    method: 'get',
    params: query
  })
}
